package com.demo.task;

import com.demo.pojo.User;
import com.demo.service.TestService;
/*
* 线程任务类
* */
public class ThreadTask implements Runnable {
    private TestService service;
    private User user;

    public ThreadTask(TestService service, User user) {
        this.service = service;
        this.user = user;
    }
    //线程任务
    @Override
    public void run() {
        service.updateMoney(user.getId(), user.getMoney());
    }
}
